﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ShredTheLog.Api;
using ShredTheLog.Api.DataContracts;
using System.ComponentModel.Composition;

namespace ShredTheLog.Plugins
{
    [Export(typeof(IUiLanguage))]
    [OrderMetadata(Order = 0)]
    [PartCreationPolicy(CreationPolicy.Shared)]
    public sealed class EnglishUiLanguage : IUiLanguage
    {
        public Language Language { get { return Language.English; } }
        public string Name { get { return "English"; } }
        public Language[] SubstituteLanguages { get { return new Language[0]; } }
    }

    [Export(typeof(IUiLanguage))]
    [OrderMetadata(Order = 100)]
    [PartCreationPolicy(CreationPolicy.Shared)]
    public sealed class RussianUiLanguage : IUiLanguage
    {
        public Language Language { get { return Language.Russian; } }
        public string Name { get { return "Русский"; } }
        public Language[] SubstituteLanguages { get { return new Language[] { Language.English }; } }
    }

    [Export(typeof(IUiLanguageStrings))]
    [PartCreationPolicy(CreationPolicy.Shared)]
    public sealed class EnglishUiLanguageStrings : IUiLanguageStrings
    {
        public Language Language { get { return Language.English; } }

        public Dictionary<string, string> GetStrings()
        {
            return new Dictionary<string, string>
                {
                    { "s_File", "_File" },
                    { "s_Exit", "Exit" },
                    { "s_Tools", "T_ools" },
                    { "s_Connection", "Connection" },
                    { "s_Menu_TextChat", "_Text Chat" },
                    { "s_TextChat", "Text Chat" },
                    { "s_Tab_TextChat", "Text" + Environment.NewLine + "Chat" },
                    { "s_Menu_LogIn", "_Member Log In" },
                    { "s_LogIn", "Member Log In" },
                    { "s_LogOut", "Log Out" },
                    { "s_Menu_Language", "Language" },
                    { "s_Label_Language", "Language:" },
                    { "s_Menu_Theme", "Theme" },
                    { "s_Label_Theme", "Theme:" },
                    { "s_Home", "Home" },
                    { "s_ConnectedUsers", "Connected Members ({0:d})" },
                    { "s_PublicChatRooms", "Public Chat Rooms" },
                    { "s_Available", "Available" },
                    { "s_Opened", "Opened" },
                    { "s_OpenRoomByName", "Open room by its name" },
                    { "s_Name", "Name" },
                    { "s_ID", "ID" },
                    { "s_NativeLanguages", "Native Language(s)" },
                    { "s_PracticingLanguages", "Practicing Language(s)" },
                    { "s_Country", "Country" },
                    { "s_Age", "Age" },
                    { "s_UID", "UID" },
                    { "s_SSID", "SSID" },
                    { "s_Profile", "Profile: {0}" },
                    { "s_RegisteredSince", "Registered since" },
                    { "s_Knows", "Knows" },
                    { "s_Learns", "Learns" },
                    { "s_Emails", "Exchange email messages" },
                    { "s_Chats", "Chat Online" },
                    { "s_UserStatus", "User status" },
                    { "s_Label_Username", "_Username" },
                    { "s_Label_Password", "_Password" },
                    { "s_RememberPassword", "_Remember password" },
                    { "s_OK", "OK" },
                    { "s_Cancel", "Cancel" },
                    { "s_Apply", "Apply" },
                    { "s_TextChatServer", "Text chat server:" },
                    { "s_BaseServer", "Base server:" },
                    { "s_TextChatDescription", "Chat Online and improve your language skills with other members" },
                    { "s_UsersInTheVoiceChat", "Members in the voice chat" },
                    { "s_UsersInTheTextChat", "Members in the text chat" },
                    { "s_NewUsers", "New members" },
                    { "s_ThereAreXPeople", "There are currently {0:d} people chatting." },
                    { "s_Anonymous", "Anonymous" },
                    { "s_Options", "_Options..." },
                    { "s_Settings", "Settings" },
                    { "s_FailedToApplySettings", "Failed to apply settings." },
                    { "s_FailedToApplySettings2", "Failed to apply settings ({0})." },
                    { "s_UserInterface", "User Interface" },
                    { "s_InvalidSendMessageGesture", "«Send Message» shortcut is invalid." },
                    { "s_SendMessageGesture", "«Send Message» shortcut:" },
                    { "s_SendTypingNotifications", "Send typing notifications" },
                    { "s_UnknownError", "Unknown error." },
                    { "s_Accept", "Accept" },
                    { "s_Decline", "Decline" },
                    { "s_ViewProfile", "View Profile" },
                    { "s_RequestPrivateChat", "Request Private Chat" },
                    { "s_StartPrivateChat", "Start Private Chat" },
                    { "s_PrivateChatRequestFrom", "Private Chat Request From {0}" },
                    { "s_Message", "Message" },
                    { "s_TextChatError", "Text Chat has encountered a problem." },
                    { "s_ShredTheLogError", "Shred the Log - Error" },
                    { "s_CoreFunctions", "Core Functions" },
                    { "s_UserHasDeclinedRequest", "User «{0}» has declined your request." },
                    { "s_Flood", "Flood" },
                    { "s_AppTitle", "Shred the Log" },
                    { "s_RoomName", "Room:" },
                    { "s_SysMessageFromUser", "System message from «{0}»: {1}" },
                    { "s_ConnectFailure", "Failed to connect to server. Try again later." },
                    { "s_Close", "Close" },
                    { "s_ChatBot", "Chat-bot" },
                    { "s_TargetLanguage", "Target language" },
                    { "s_ChatNow", "Chat Now" },
                    { "s_DetailsCard", "Details Card" },
                    { "s_General", "General" },
                    { "s_Comments", "Comments" },
                    { "s_Talk", "Talk..." },
                    { "s_Gender", "Gender" },
                    { "s_UserIn", "User in" },
                    { "s_More", "More" },
                    { "s_Login", "_Login" },
                    { "s_View", "_View" },
                    { "s_Odigo_Tools", "T_ools" },
                    { "s_VoiceChatUsers", "Voice chat users" },
                    { "s_TextChatUsers", "Text chat users" },
                    { "s_Last15Users", "Last 15 users" },
                    { "s_OpenRoom", "Open Room" },
                    { "s_Go", "GO" },
                    { "s_CROther", "Multi-Language" },
                    { "s_CRSca", "Scandinavian Languages" },
                    { "s_AboutDialogTitle", "About {0:s}" },
                    { "s_Odigo_Help", "_?" },
                    { "s_Help", "_Help" },
                    { "s_About", "_About..." },
                    { "s_ProductInfo", "{0:s} v{1:s}" },
                    { "s_Credits", "Credits:" },
                    { "s_ExpectingNonEmptyString", "Expecting non-empty string." },
                    { "s_Website", "_Website..." },
                    { "s_Forum", "_Forum..." },
                    { "s_YourLanguageExchangeNetwork", "Your Language Exchange Network" },
                    { "s_SharedTalkIs", "This program is a SharedTalk client. SharedTalk is a Community of People from all around the World and is dedicated to Language Exchange and Language Learning." },
                    { "s_Flash_Register", "JOIN SharedTalk !" },
                    { "s_RegisterDescription", "Join the community, become a Member, it's FREE !" },
                    { "s_DiscoverSharedTalk", "_Discover SharedTalk" },
                    { "s_DiscoverSharedTalkDescription", "Discover how SharedTalk can help you learn foreign languages" },
                    { "s_UserSearch", "_Find a Language Partner" },
                    { "s_Tab_UserSearch", "Members" + Environment.NewLine + "Search" },
                    { "s_Tab_Odigo_UserSearch", "Members Search" },
                    { "s_UserSearchDescription", "Find the perfect partner for your language exchange" },
                    { "s_Mailbox", "Check your Mailbox" },
                    { "s_MailboxDescription", "Read and manage your mail, reply by email to your partners" },
                    { "s_VoiceChat", "Voice Chat" },
                    { "s_VoiceChatDescription", "Practice your speaking skills and get more fluent than ever" },
                    { "s_EditProfile", "Edit your data" },
                    { "s_EditProfileDescription", "View and Edit Your Profile" },
                    { "s_Menu_ContactList", "_Contact List" },
                    { "s_ContactList", "Contact List" },
                    { "s_ContactListDescription", "Manage and connect with your Language Partners" },
                    { "s_Tab_ContactList", "Contact" + Environment.NewLine + "List" },
                    { "s_AddContact", "Add Contact" },
                    { "s_DeleteContact", "Delete Contact" },
                    { "s_ContactAdded", "Contact has been added." },
                    { "s_ContactDeleted", "Contact has been deleted." },
                    { "s_FailedToAddContact", "Failed to add contact." },
                    { "s_FailedToDeleteContact", "Failed to delete contact." },
                    { "s_Translation", "Translation" },
                    { "s_IsTranslatorActive", "Active" },
                    { "s_UiLanguage", "UI language" },
                    { "s_FailedToGetContactList", "Failed to get contact list." },
                    { "s_Register", "Register..." },
                    { "s_CustomChatRoom", "Custom chat room..." },
                    { "s_InvalidCredentialsException", "Login failed: user name or password is incorrect." },
                    { "s_UserDeletedException", "Login failed: user has been deleted." },
                    { "s_FullBanException", "Login failed: user has been banned." },
                    { "s_LoginException", "Login failed." },
                    { "s_ClickToLogIn", "Only logged-in members can participate to conversations. Click here to log in!" },
                    { "s_Menu", "Menu" },
                    { "s_ChatRooms", "Chats" },
                    { "s_Conditions_UserSearch", "User Search" },
                    { "s_NewSearch", "New Search" },
                    { "s_NextPage", "Next Page" },
                    { "s_PreviousPage", "Previous Page" },
                    { "s_SearchNow", "Search Now" },
                    { "s_NativeLanguage", "Native Language" },
                    { "s_PracticingLanguage", "Practicing Language" },
                    { "s_SeekingAChatExchange", "Seeking a chat exchange" },
                    { "s_FirstName", "First Name" },
                    { "s_LastName", "Last Name" },
                    { "s_From", "From" },
                    { "s_To", "To" },
                    { "s_City", "City" },
                    { "s_MembersFound", "{0:d} Members Found - Page {1:d}/{2:d}" },
                    { "s_Simple_NextPage", ">>" },
                    { "s_Simple_PreviousPage", "<<" },
                    { "s_Flash_MembersInThisRoom", "Members in this room" },
                    { "s_ShowMessageTime", "Show message time" },
                    { "s_Notifications", "Notifications" },
                    { "s_NotifyOnMessagesInActiveChatWindows", "Notify on messages in active chat windows" },
                    { "s_NotifyOnPublicChatMessages", "Notify on public chat messages" },
                    { "s_SoundNotification", "Sound" },
                    { "s_FlashWindowNotification", "Flash window" },
                    { "s_BalloonTipNotification", "Balloon tip" },
                    { "s_UseDefaultConnectionSettings", "Use default connection settings" },
                };
        }
    }

    [Export(typeof(IUiLanguageStrings))]
    [PartCreationPolicy(CreationPolicy.Shared)]
    public sealed class RussianUiLanguageStrings : IUiLanguageStrings
    {
        public Language Language { get { return Language.Russian; } }

        public Dictionary<string, string> GetStrings()
        {
            return new Dictionary<string, string>
                {
                    { "s_File", "_Файл" },
                    { "s_Exit", "Выход" },
                    { "s_Tools", "_Инструменты" },
                    { "s_Connection", "Соединение" },
                    { "s_Menu_TextChat", "_Текстовый чат" },
                    { "s_TextChat", "Текстовый чат" },
                    { "s_Tab_TextChat", "Текстовый" + Environment.NewLine + "чат" },
                    { "s_Menu_LogIn", "_Вход участника" },
                    { "s_LogIn", "Вход участника" },
                    { "s_LogOut", "Выход" },
                    { "s_Menu_Language", "Язык" },
                    { "s_Label_Language", "Язык:" },
                    { "s_Menu_Theme", "Тема" },
                    { "s_Label_Theme", "Тема:" },
                    { "s_Home", "Домой" },
                    { "s_ConnectedUsers", "Подключенные участники ({0:d})" },
                    { "s_PublicChatRooms", "Общие чат-комнаты" },
                    { "s_Available", "Доступные" },
                    { "s_Opened", "Открытые" },
                    { "s_OpenRoomByName", "Открыть чат-комнату по имени" },
                    { "s_Name", "Имя" },
                    { "s_ID", "ID" },
                    { "s_NativeLanguages", "Родные языки" },
                    { "s_PracticingLanguages", "Изучаемые языки" },
                    { "s_Country", "Страна" },
                    { "s_Age", "Возраст" },
                    { "s_UID", "UID" },
                    { "s_SSID", "SSID" },
                    { "s_Profile", "Профиль: {0}" },
                    { "s_RegisteredSince", "Зарегистрирован" },
                    { "s_Knows", "Знает" },
                    { "s_Learns", "Учит" },
                    { "s_Emails", "Обмен сообщениями" },
                    { "s_Chats", "Общение в чате" },
                    { "s_UserStatus", "Статус пользователя" },
                    { "s_Label_Username", "_Имя пользователя" },
                    { "s_Label_Password", "_Пароль" },
                    { "s_RememberPassword", "_Запомнить пароль" },
                    { "s_OK", "OK" },
                    { "s_Cancel", "Отмена" },
                    { "s_Apply", "Применить" },
                    { "s_TextChatServer", "Сервер текстового чата:" },
                    { "s_BaseServer", "Базовый сервер:" },
                    { "s_TextChatDescription", "Общайтесь в чате и повышайте уровень своей языковой подготовки" },
                    { "s_UsersInTheVoiceChat", "Участники в голосовом чате" },
                    { "s_UsersInTheTextChat", "Участники в текстовом чате" },
                    { "s_NewUsers", "Новые участники" },
                    { "s_ThereAreXPeople", "Сейчас в чате {0:d} чел." },
                    { "s_Anonymous", "Аноним" },
                    { "s_Options", "_Параметры..." },
                    { "s_Settings", "Параметры" },
                    { "s_FailedToApplySettings", "Не удалось выставить параметры." },
                    { "s_FailedToApplySettings2", "Не удалось выставить параметры ({0})." },
                    { "s_UserInterface", "Интерфейс" },
                    { "s_InvalidSendMessageGesture", "Команде «Отправить сообщение» назначена неверная комбинация клавиш." },
                    { "s_SendMessageGesture", "Комбинация клавиш «Отправить сообщение»:" },
                    { "s_SendTypingNotifications", "Отсылать оповещения о наборе текста" },
                    { "s_UnknownError", "Неизвестная ошибка." },
                    { "s_Accept", "Принять" },
                    { "s_Decline", "Отклонить" },
                    { "s_ViewProfile", "Открыть профайл" },
                    { "s_RequestPrivateChat", "Запросить приватный чат" },
                    { "s_StartPrivateChat", "Начать приватный чат" },
                    { "s_PrivateChatRequestFrom", "Приглашение в приватный чат от {0}" },
                    { "s_Message", "Сообщение" },
                    { "s_TextChatError", "Ошибка в текстовом чате." },
                    { "s_ShredTheLogError", "Shred The Log - Ошибка" },
                    { "s_CoreFunctions", "Базовая функциональность" },
                    { "s_UserHasDeclinedRequest", "Пользователь «{0}» отклонил ваше приглашение." },
                    { "s_Flood", "Зафлудить" },
                    { "s_AppTitle", "Shred the Log" },
                    { "s_RoomName", "Чат-комната:" },
                    { "s_SysMessageFromUser", "Системное сообщение от «{0}»: {1}" },
                    { "s_ConnectFailure", "Не удалось связаться с сервером. Повторите попытку позже." },
                    { "s_Close", "Закрыть" },
                    { "s_ChatBot", "Чат-бот" },
                    { "s_TargetLanguage", "Целевой язык" },
                    { "s_ChatNow", "Войти в чат" },
                    { "s_DetailsCard", "Карточка пользователя" },
                    { "s_General", "Общее" },
                    { "s_Comments", "Комментарии" },
                    { "s_Talk", "Чат..." },
                    { "s_Gender", "Пол" },
                    { "s_UserIn", "Из" },
                    { "s_More", "Еще" },
                    { "s_Login", "_Файл" },
                    { "s_View", "_Обзор" },
                    { "s_Odigo_Tools", "_Инстр." },
                    { "s_VoiceChatUsers", "Пользователи в голосовом чате" },
                    { "s_TextChatUsers", "Пользователи в текстовом чате" },
                    { "s_Last15Users", "Последние 15 пользователей" },
                    { "s_OpenRoom", "Открыть чат-комнату" },
                    { "s_Go", "Жми" },
                    { "s_CROther", "Несколько языков" },
                    { "s_CRSca", "Скандинавские языки" },
                    { "s_AboutDialogTitle", "О программе {0:s}" },
                    { "s_Odigo_Help", "_?" },
                    { "s_Help", "_Справка" },
                    { "s_About", "О программе..." },
                    { "s_ProductInfo", "{0:s} v{1:s}" },
                    { "s_Credits", "Credits:" },
                    { "s_ExpectingNonEmptyString", "Ожидается непустая строка." },
                    { "s_Website", "_Сайт..." },
                    { "s_Forum", "_Форум..." },
                    { "s_YourLanguageExchangeNetwork", "Ваша сеть языкового обмена" },
                    { "s_SharedTalkIs", "Эта программа позволяет общаться в чате SharedTalk. SharedTalk — это сообщество людей из различных стран мира, целью которого является языковой обмен и изучение языков." },
                    { "s_Flash_Register", "Присоединяйся!" },
                    { "s_RegisterDescription", "Станьте участником сообщества, это БЕСПЛАТНО!" },
                    { "s_DiscoverSharedTalk", "_Все о SharedTalk" },
                    { "s_DiscoverSharedTalkDescription", "Как SharedTalk может помочь в изучении иностранных языков" },
                    { "s_UserSearch", "_Найти партнера" },
                    { "s_Tab_UserSearch", "Поиск" + Environment.NewLine + "участников" },
                    { "s_Tab_Odigo_UserSearch", "Поиск участников" },
                    { "s_UserSearchDescription", "Поиск наилучшего партнера для языкового обмена" },
                    { "s_Mailbox", "Проверить почту" },
                    { "s_MailboxDescription", "Электронная почта поможет вам общаться с партнерами" },
                    { "s_VoiceChat", "Голосовой чат" },
                    { "s_VoiceChatDescription", "Практика устного общения поможет лучше говорить и понимать других" },
                    { "s_EditProfile", "Изменить данные" },
                    { "s_EditProfileDescription", "Просмотр и изменение профиля" },
                    { "s_Menu_ContactList", "_Контакты" },
                    { "s_ContactList", "Контакты" },
                    { "s_ContactListDescription", "Поддерживайте связь со своими новыми друзьями" },
                    { "s_Tab_ContactList", "Контакты" },
                    { "s_AddContact", "Добавить контакт" },
                    { "s_DeleteContact", "Удалить контакт" },
                    { "s_ContactAdded", "Контакт добавлен." },
                    { "s_ContactDeleted", "Контакт удален." },
                    { "s_FailedToAddContact", "Не удалось добавить контакт." },
                    { "s_FailedToDeleteContact", "Не удалось удалить контакт." },
                    { "s_Translation", "Перевод" },
                    { "s_IsTranslatorActive", "Включен" },
                    { "s_UiLanguage", "Язык интерфейса" },
                    { "s_FailedToGetContactList", "Не удалось получить список контактов." },
                    { "s_Register", "Регистрация..." },
                    { "s_CustomChatRoom", "Специальная чат-комната..." },
                    { "s_InvalidCredentialsException", "Не удалось выполнить вход: неверное имя пользователя или пароль." },
                    { "s_UserDeletedException", "Не удалось выполнить вход: учетная запись пользователя удалена." },
                    { "s_FullBanException", "Не удалось выполнить вход: учетная запись пользователя заблокирована." },
                    { "s_LoginException", "Не удалось выполнить вход." },
                    { "s_ClickToLogIn", "Только зарегистрированные пользователи могут отправлять сообщения. Нажмите сюда, чтобы войти в чат!" },
                    { "s_Menu", "Меню" },
                    { "s_ChatRooms", "Чаты" },
                    { "s_Conditions_UserSearch", "Поиск участников" },
                    { "s_NewSearch", "Новый поиск" },
                    { "s_NextPage", "Следующая страница" },
                    { "s_PreviousPage", "Предыдущая страница" },
                    { "s_SearchNow", "Найти" },
                    { "s_NativeLanguage", "Родной язык" },
                    { "s_PracticingLanguage", "Язык для практики" },
                    { "s_SeekingAChatExchange", "Поиск общения в чате" },
                    { "s_FirstName", "Имя" },
                    { "s_LastName", "Фамилия" },
                    { "s_From", "От" },
                    { "s_To", "до" },
                    { "s_City", "Город" },
                    { "s_MembersFound", "{0:d} Найденные участники - Страница {1:d}/{2:d}" },
                    { "s_Simple_NextPage", ">>" },
                    { "s_Simple_PreviousPage", "<<" },
                    { "s_Flash_MembersInThisRoom", "Участники в чат-зале" },
                    { "s_ShowMessageTime", "Показывать время сообщения" },
                    { "s_Notifications", "Оповещения" },
                    { "s_NotifyOnMessagesInActiveChatWindows", "Оповещать о сообщениях в активных окнах" },
                    { "s_NotifyOnPublicChatMessages", "Оповещать о сообщениях в общих чатах" },
                    { "s_SoundNotification", "Звуковое оповещение" },
                    { "s_FlashWindowNotification", "Мигание окна" },
                    { "s_BalloonTipNotification", "Всплывающая подсказка" },
                    { "s_UseDefaultConnectionSettings", "Использовать настройки соединения по-умолчанию" },
                };
        }
    }

    [Export(typeof(IUiLanguageStrings))]
    [PartCreationPolicy(CreationPolicy.Shared)]
    public sealed class GeneratedEnglishUiLanguageStrings : IUiLanguageStrings
    {
        public Language Language { get { return Language.English; } }

        public Dictionary<string, string> GetStrings()
        {
            return enGeneratedLanguageData.Strings;
        }
    }

    [Export(typeof(IUiLanguageStrings))]
    [PartCreationPolicy(CreationPolicy.Shared)]
    public sealed class GeneratedRussianUiLanguageStrings : IUiLanguageStrings
    {
        public Language Language { get { return Language.Russian; } }

        public Dictionary<string, string> GetStrings()
        {
            return ruGeneratedLanguageData.Strings;
        }
    }
}
